<!DOCTYPE HTML>
<html>
<head>
    <include file="Common:header_include"/>
    <title>编辑检查单分类</title>
    <style>
        .check-box{
            width: 320px;
            padding-bottom: 10px;
            height: 50px;
            overflow: hidden;

        }
    </style>
</head>
<body>
<div class="pd-20">
    <form action="{:U('edit')}" method="post" class="form form-horizontal" id="form">
        <input name="id" value="{$data.id}" hidden="hidden">
        <div class="row cl">
            <label class="form-label col-1"><span class="c-red">*</span>检查单分类名称：</label>
            <div class="formControls col-5">
                <input type="text" class="input-text" placeholder="请输入" name="name" datatype="*" nullmsg="不能为空" value="{$data.name}">
            </div>
            <div class="col-4"></div>
        </div>
        <div class="row cl">
            <label class="form-label col-1"><span class="c-red">*</span>检查单所属分类：</label>
            <div class="formControls col-5">
                <span class="select-box">
                <select class="select Validform_error" size="1" name="typeid" datatype="*" nullmsg="请选择" onchange="selectTopMenu()">
                    <option value="" selected="" disabled="disabled">请选择</option>
                    <volist name=":getLists(Inspectiontypeinfo)" id="v">

                        <option value="{$v['id']}" <if condition="$data['typeid'] eq $v['id']">selected</if>>{$v['name']}</option>
                    </volist>
                </select>
                </span>
            </div>
            <div class="col-4"></div>
        </div>
			<div class="row cl">
            <label class="form-label col-1">排序：</label>
            <div class="formControls col-5">
                <input type="text" class="input-text" placeholder="请输入" name="sort" value="{$data['sort']}">
            </div>
        </div>
        <div class="row cl">
            <label class="form-label col-1">描述：</label>
            <div class="formControls col-5">
                <textarea rows="5" cols="113" style="resize:none;" name="description" class="textarea" placeholder="请输入描述信息">{$data['description']}</textarea>
            </div>
            <div class="col-4"></div>
        </div>

        <div class="row cl">
            <label class="form-label col-xs-4 col-sm-1">检查项：</label>
            <div class="formControls skin-minimal col-11" >
                   <volist name=":getList(inspectioniteminfo,'','id asc')" id="vo">
                      <div class="check-box" style="margin: 5px">
                         <input type="checkbox" name="itemid[]" <if condition="in_array($vo['id'],$itemid)"> checked</if> value="{$vo['id']}" >
                          <label style="color: red">[{$vo['id']}]</label> <label >{$vo['name']}</label>
                      </div>
                 </volist>
            </div>
        </div>
        <div class="row cl">
            <div class="col-9 col-offset-3">
                <input class="btn btn-primary radius" type="submit" value="提交">
            </div>
        </div>
    </form>
</div>
<include file="Common:footer_include"/>
</body>
</html>